package ooday05;

import java.util.Random;

public class EnumDemo {
    public static void main(String[] args) {
//        Season s=Season.SPRING;
//        System.out.println(s.getSeasonDesc());
//        Season[] seasons=Season.values();
//        for (int i = 0; i < seasons.length; i++) {
//            System.out.println(seasons[i].getSeasonName());
//        }
        Random r=new Random();
        int rs=r.nextInt(4);
        String randomSeason;
        if(rs==0){
            randomSeason="SPRING";
        }else if(rs==1){
            randomSeason="SUMMER";
        }else if(rs==2){
            randomSeason="AUTUMN";
        }else {
            randomSeason="WINTER";
        }
        Season s=Season.valueOf(randomSeason);
//        System.out.println(s.getSeasonName());
        switch (s){
            case SPRING:
                System.out.println(s.getSeasonName()+" is very "+s.getSeasonDesc());
                break;
            case SUMMER:
                System.out.println(s.getSeasonName()+" is very "+s.getSeasonDesc());
                break;
            case AUTUMN:
                System.out.println(s.getSeasonName()+" is very "+s.getSeasonDesc());
                break;
            case WINTER:
                System.out.println(s.getSeasonName()+" is very "+s.getSeasonDesc());
                break;
        }
    }
}
